<!--分类信息-->
{%if sort%}
<div class="panel panel-default tabs">

    <div class="panel-body nopadding">
        <table class="table table-hover  m-b-none " style="margin-top: -1px">
            <tbody>
            {% set typenum = 1%}
            {%for val in typevar%}
            {%if val.search > 1 and val.available==1%}
            <tr {% if typenum > 3 %} class="type_tr_m"  style="display:none"{%endif%} >
                <td style="width: 60px" class="text-right">
                    {{val.option.title}}:
                </td>
                <td>
                    {%if 0 == nsobj[val.option.identifier] or null == nsobj[val.option.identifier]%}
                    <span class="btn btn-danger btn-xs relative">全部</span>
                    {%else%}
                    <a href="{{cate.url}}-{{order}}-{{group_id}}-{{sortid}}-{{0|sort_url(val.option.identifier,typevar,nsobj)| urlencode}}?{{ctx.query|query_string(['page','shangpingleibie'])}}" class="btn btn-clean btn-xs relative" >全部</a>
                    {%endif%}
                    {%for v in val.rules %}
                    {%if v.id|sort_act(nsobj[val.option.identifier])%}
                    <span class="btn btn-danger btn-xs relative" >{{v.name or v.label}}{{val.option.unit}}</span>
                    {%else%}
                    <a href="{{cate.url}}-{{order}}-{{group_id}}-{{sortid}}-{{v.id|sort_url(val.option.identifier,typevar,nsobj)| urlencode}}?{{ctx.query|query_string(['page','shangpingleibie'])}}" class="btn btn-clean btn-xs relative" >{{v.name or v.label}}{{val.option.unit}}</a>
                    {%endif%}
                    {%endfor%}
                </td>
                <td style="width: 120px;border-bottom: 1px solid #ddd;" class="text-center"></td>
            </tr>
                    <!--子栏目-->
                    {%for v in val.rules %}
                    {%if v.id|sort_act(nsobj[val.option.identifier])%}
                    {% if v.children%}
                    <tr >
                            <td style="width: 60px" class="text-right">
                                {{childcategory[val.option.identifier]}}:
                            </td>
                            <td id="singlecheckArea" {% if  shangpingleibie | length != 0 %}style="display: none;"{%endif%}> 
                                {%if nsobj[val.option.identifier]|length==1 or (v_.id) == nsobj[val.option.identifier]%}
                                <span class="btn btn-danger btn-xs relative">全部</span>
                                {%else%}
                                <a href="{{cate.url}}-{{order}}-{{group_id}}-{{sortid}}-{{(nsobj[val.option.identifier].slice(0,1))|sort_url(val.option.identifier,typevar,nsobj)| urlencode}}?{{ctx.query|query_string(['page','shangpingleibie'])}}" class="btn btn-clean btn-xs relative" >全部</a>
                                {%endif%}
                                {% for v_ in v.children %}
                                {%if v_.id|sort_act(nsobj[val.option.identifier] ) or ((v_.id) == nsobj[val.option.identifier])%}
                                <span class="btn btn-danger btn-xs relative" >{{v_.name or v_.label}}{{val.option.unit}}</span>
                                {%else%}
                                <a href="{{cate.url}}-{{order}}-{{group_id}}-{{sortid}}-{{v_.id|sort_url(val.option.identifier,typevar,nsobj)| urlencode}}?{{ctx.query|query_string(['page','shangpingleibie'])}}" class="btn btn-clean btn-xs relative">{{v_.name or v_.label}}{{val.option.unit}}</a>
                                {%endif%}
                                {% endfor %}
                            </td>
                            <td id="multicheckArea"  {% if shangpingleibie | length == 0 %}style="display: none;"{%endif%}>
                                    {% for v_ in v.children %}
                                    <div class="form-check form-check-inline" style="padding: 4px;">
                                            <input class="form-check-input" type="checkbox"  id="inlineCheckbox{{v_.id}}" value="{{v_.id}}" {% if shangpingleibie.indexOf(v_.id) !=-1%}checked{%endif%}>
                                            <label class="form-check-label" for="inlineCheckbox{{v_.id}}">{{v_.name or v_.label}}</label>
                                    </div>
                                    {% endfor %}
                            </td>
                            <td style="width: 120px;border-bottom: 1px solid #ddd;" class="text-center">
                                <span id="multicheck" class="btn btn-danger btn-xs relative"  {% if shangpingleibie | length != 0 %}style="display: none;"{%endif%}> + 多选</span> 
                                <span id="multicheckdone" class="btn btn-danger btn-xs relative"  {% if shangpingleibie | length == 0 %}style="display: none;"{%endif%}>确定</span> 
                                <span id="multicheckcancle" class="btn btn-light btn-xs relative"  {% if shangpingleibie | length == 0 %}style="display: none;"{%endif%}>取消</span> 
                            </td>            
                        </tr>
                    {%endif%}
                    {%endif%}
                    {%endfor%}
            {% set typenum = typenum+1%}
            {%endif%}
            {%endfor%}

            </tbody>
        </table>
        <div class="tab-content " style="padding: 0; margin-top: -1px">
            {% if typenum > 4%}
            <a href="javascript:;" class="center-block btn btn-xs btn-white type_tr_b1" style="border-top: 1px solid #cfd8e1; display: block"><span class="fa fa-chevron-down"></span></a>
            <a href="javascript:;" class="center-block btn btn-xs btn-white type_tr_b2" style="border-top: 1px solid #cfd8e1; display: none"><span class="fa fa-chevron-up"></span></a>
            {%endif%}
        </div>
    </div>
</div>
{%endif%}
<!--/分类信息-->